/**
 * /**
 * Created by wu on 17/04/11.
 *
 * @param $rootScope
 * @param $scope
 * @param $stateParams
 * @param $state
 * @param loginService
 */
module.exports = function ($rootScope,$scope,$stateParams,$state,loginService){

    $scope.email = $stateParams.email;

    var wait = 5;

    /**
     * 5秒倒计时方法
     */
    $scope.time = function () {
        if (wait == 0) {
            $state.go('loginHeader.login');
        } else {
            $('.register-fail-return').html(wait);
            wait--;
            setTimeout(function () {
                $scope.time()
            }, 1000)
        }
    }

    $('.email-go-verification').click(function(){
        $state.go('loginHeader.register');
    });

};
